import React from 'react';
import ReactDOM from 'react-dom/client';
import { Provider } from 'react-redux'
import App from './App';
import store from './store'
import ssoWeb from './libs/sso'
import localStorage from './utils/localStorage';

// SSO登陆
ssoWeb.login().then(ssoid => {
  console.log(ssoid)
  if (typeof ssoid === 'string') {
    localStorage.setItem('token', ssoid)
    ReactDOM.createRoot(document.getElementById('root')!).render(
      <React.StrictMode>
        <Provider store={store}>
          <App />
        </Provider>
      </React.StrictMode>
    )
  }
})
